package demo;

import top.lingkang.finalgateway.utils.AntPathMatcher;

import java.net.URL;

/**
 * @author lingkang
 * @create by 2024/4/26 15:06
 */
public class Demo07 {
    public static void main(String[] args) throws Exception {
        AntPathMatcher matcher = new AntPathMatcher();
        String path = matcher.extractPathWithinPattern("/auth/**", "/auth/index.html");
        System.out.println(path);

        path = matcher.extractPathWithinPattern("/auth-center/**", "/auth/index.html");
        System.out.println(path);


        String http = "http://10.8.6.125/auth-center/**";
        URL url = new URL(http);
        System.out.println(url.getHost());
        System.out.println(url.getPort());
    }
}
